#pragma once

#include "cfg.h"
#include "MsgBuf.h"
#include "SHARE.h"

class LogMng {
protected:
	Cfg		*cfg;
	BOOL	Write(LPCSTR str);

public:
	LogMng(Cfg *_cfg);

	BOOL	WriteSendStart(void);
	BOOL	WriteSendHead(LPCSTR head);
	BOOL	WriteSendMsg(LPCSTR msg, ULONG command, ShareInfo *shareInfo=NULL);
	BOOL	WriteRecvMsg(MsgBuf *msg, THosts *hosts, ShareInfo *shareInfo=NULL);
	BOOL	WriteStart(void);
	BOOL	WriteMsg(LPCSTR msg, ULONG command, ShareInfo *shareInfo=NULL);

	static void StrictLogFile(char *path);
};


